<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl.'/js/form-validator.js')?>
<?php
/* @var $this BackendController */
/* @var $model NoteForm */

$this->breadcrumbs=array(
    'Users'=>array('index'),
    $model->name,
);?>
<?php $this->menu = array(
    array('label'=>'<span class="glyphicon glyphicon-user"></span>&nbsp'.Yii::t('UserModule.base','Manage Users'), 'url'=>array('/user/backend/admin')),
    array('label'=>'<span class="glyphicon glyphicon-plus"></span>&nbsp'.Yii::t('UserModule.base','Create User'), 'url'=>array('/user/backend/create')),
    array('label'=>'<span class="glyphicon glyphicon-list"></span>&nbsp'.Yii::t('UserModule.base','List Users'), 'url'=>array('/user/backend/index')),
)?>
<div class="panel panel-primary">
    <div class="panel-heading">
       <?php echo Yii::t('UserModule.base','Sending notifications to the user').'&nbsp'.'<b>'.$model->name.'</b>' ?>
    </div>

    <div class="alert alert-info" style="width:800px;margin:0 auto;margin-top:20px;">
        <strong><?php echo Yii::t('UserModule.base','Warning!')?></strong>&nbsp<i><?php echo Yii::t('UserModule.base','Fields with');?><span class="required"> * </span> <?php echo Yii::t('UserModule.base','are required.');?></i>
    </div>

    <div class="form">
        <?php $form=$this->beginWidget('TActiveForm', array(
            'id'=>'user-form',
            'enableAjaxValidation'=>true,
            'enableClientValidation'=>true,
            'clientOptions'=>array(
                'beforeValidate'=>'js:beforeValidate',
                'afterValidate'=>'js:afterValidate',
                'validateOnSubmit'=>true,
                'validateOnType'=>true,
                'validateOnChange'=>true,
                'hideErrorMessage'=>true
            ),
        )); ?>

    <div class="panel-body">
        <div class="input-group">
            <?php echo $form->labelTb($model,'email',array('style'=>'width:85px')); ?>
            <?php echo $form->emailFieldTb($model,'email'); ?>
            <?php echo $form->error($model,'email',array('afterValidateAttribute'=>'js:afterValidateAttribute')); ?>
        </div>

        <div class="input-group">
            <?php echo $form->labelTb($model,'message'); ?>
            <?php echo $form->textArea($model,'message',array('class'=>'textarea','cols'=>'80','rows'=>'10')); ?>
            <?php echo $form->error($model,'message',array('afterValidateAttribute'=>'js:afterValidateAttribute')); ?>
        </div>


        <div class = "row buttons">
            <?php echo CHtml::submitButton(Yii::t('UserModule.base','Submit'),array('class'=>'btn btn-primary'))?>
        </div>
        <?php $this->endWidget(); ?>
    </div><!--panel body-->

    </div><!--form-->
</div><!--panel-primary-->